var common_service = angular.module('OtherService');
common_service.service('common_service',['$ionicPopup',function($ionicPopup){
	var self = this;
	self.pop1 = function(scope){
		var myPopup = $ionicPopup.show({
             template: '<div class="cf" style="margin-top:1em;border-bottom: 2px solid #E7E7EA;"><label style="position:absolute;line-height:2.4;color:#aaa;font-size:12px;">姓名：</label><input maxlength="12" style="font-size:12px;text-align:right;" placeholder="请填写真实姓名" type="text" ng-model="data.name"></div>'
             +'<div class="cf" style="border-bottom: 2px solid #E7E7EA;"><label style="position:absolute;line-height:2.4;color:#aaa;font-size:12px;">身份证号：</label><input maxlength="18" style="font-size:12px;text-align:right;" placeholder="请填写身份证号码" type="text" ng-model="data.cardId"></div>'
             +'<div class="cf" style="border-bottom: 2px solid #E7E7EA;"><label style="position:absolute;line-height:2.4;color:#aaa;font-size:12px;">手机号码：</label><input maxlength="11" style="font-size:12px;text-align:right;" placeholder="请填写您常用的手机号码" type="text" ng-model="data.phone"></div>'
             +'<p style="line-height:2;color:#999;">注：所有信息博朗斯为您保密</p>',
             title: '为保障您的协议权利<br>请如实填写您的身份信息',
             scope: scope,
             buttons: [
               {
                 text: '<span style="font-size:12px;">确&nbsp;&nbsp;定</span>',
                 type: 'button-energized',
                 onTap: function(e) {
                   if ( scope.data.name && scope.data.cardId && scope.data.phone) {
                     return scope.data;
                   } else {
                     e.preventDefault();
                   }
                 }
               },
             ]
           });
		return myPopup;
	}
}])
 